home *** CD-ROM | disk | FTP | other *** search
- {SENDFILE.ACT}
-
- { This action file is called by HANDYKEY.ACT. }
- { It can also be invoked directly by putting the file name }
- { SENDFILE.ACT into the Communications Paramenter Menu. }
- { This action file first ask the host the name of the file to }
- { send. If the requested file name exists, then the file is sent}
- { in ASCII. Otherwise, a message is sent to the host. }
-
- "What file would you like?" {ask host for file name }
- @a=getline {get the name into @a }
- @b=EXIST(@a) {if the file exist, @b is non zero }
- "$0d$0a"
- if (@b = 0 ) goto :badfile
- if (sendfile(@a, "ASCII") = -1) "Cannot open file$0a$0d";
- TYPECR("End of send file")
- exit
-
- :badfile
- "File Not Found$0d$0a"; { tell host: file not found}